You can validate your CloudFormation template to catch syntax and semantic errors, before CloudFormation creates any resources

cfn-lint: https://github.com/aws-cloudformation/cfn-lint

cfn-guard: https://github.com/aws-cloudformation/cloudformation-guard